$(function(){
    //搜索点击事件
    $(".search-btn").click(function(){
        var res =$.trim($(".search-input").val());
        if(res){
            res= encodeURIComponent(res);
            window.location.href='/search/?title='+res;
        }else{
            alert("请输入搜索内容");
        }
    });
})